//
//  UIButton-extension.swift
//  weibo-new
//
//  Created by mac on 2017/3/27.
//  Copyright © 2017年 gjx. All rights reserved.
//

import UIKit

extension UIButton {
    convenience init(imgName: String, backImgName: String) {
        self.init()
        
        setImage(UIImage(named: imgName), for: .normal)
        setImage(UIImage(named: imgName + "highlighted"), for: .highlighted)
        setBackgroundImage(UIImage(named: backImgName), for: .normal)
        setBackgroundImage(UIImage(named: backImgName + "highlighted"), for: .highlighted)
        sizeToFit()
    }
}
